﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="updateuser1.aspx.cs" Inherits="test_updateuser1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">  
    <table id="table1" border="0" width="100%" class="font33">
        <tr>
            <td style="width: 980px">
                <asp:Button ID="btnBack" runat="server" OnClick="btnBack_Click" Text="回上一页" />
                <asp:Button ID="Button2" runat="server" Text="编辑" onclick="Button2_Click" />
            </td>
            <td style="width: 2px">&nbsp;
              
            </td>
        </tr>
        <tr>
            <td style="width: 980px">
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource2"
                    Height="50px" Width="600px" DataKeyNames="id" CellPadding="4" 
                    ForeColor="#D9EDB2" GridLines="None" cssclass="font33">
                    <Fields>
                        <asp:TemplateField HeaderText="id" InsertVisible="False" SortExpression="id" 
                            Visible="False">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("id") %>'></asp:Label>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="用户名" SortExpression="username">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("username") %>'></asp:Label>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="姓名" SortExpression="username1">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_user" runat="server" Text='<%# Bind("username1") %>'></asp:TextBox>
                            </ItemTemplate>
                           
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="身份" SortExpression="role">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_role" runat="server" Text='<%# Bind("role") %>'></asp:TextBox>
                            </ItemTemplate>
                        
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="手机" SortExpression="mobile">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_mob" runat="server" Text='<%# Bind("mobile") %>'></asp:TextBox>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="mail" SortExpression="mail">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_mail" runat="server" Text='<%# Bind("mail") %>'></asp:TextBox>
                            </ItemTemplate>
                           
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="工作单位" SortExpression="gzdw">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_gzdw" runat="server" Text='<%# Bind("gzdw") %>'></asp:TextBox>
                            </ItemTemplate>
                           
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="机构">
                            <ItemTemplate>
                            <asp:DropDownList ID="jigou" runat=server>
                            </asp:DropDownList>                               
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="个人简介">
                            <ItemTemplate>
                         
                                <asp:TextBox ID="txt_grjj" runat="server" Text='<%# Bind("grjj") %>' TextMode="MultiLine"  Height="144px" Width="494px" ></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="机构领导" SortExpression="leader">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_leader" runat="server" Text='<%# Bind("leader") %>'></asp:TextBox>
                            </ItemTemplate>
                        
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="城市" SortExpression="city">
                            <ItemTemplate>
                                <asp:TextBox ID="txt_city" runat="server" Text='<%# Bind("city") %>'></asp:TextBox>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="储值" SortExpression="chuzhi">
                            <ItemTemplate>
                                <asp:Label ID="Label10" runat="server" Text='<%# Bind("chuzhi") %>'></asp:Label>
                            </ItemTemplate>
                          
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="已收课费" SortExpression="yiskf">
                            <ItemTemplate>
                                <asp:Label ID="Label11" runat="server" Text='<%# Bind("yiskf") %>'></asp:Label>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="创建时间" SortExpression="xtsj1">
                            <ItemTemplate>
                                <asp:Label ID="Label12" runat="server" Text='<%# Bind("xtsj1") %>'></asp:Label>
                            </ItemTemplate>
                       
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="上次修改时间" SortExpression="xtsj1">
                            <ItemTemplate>
                                <asp:Label ID="Label13" runat="server" Text='<%# Bind("xtsj2") %>'></asp:Label>
                            </ItemTemplate>
                         
                        </asp:TemplateField>
                    </Fields>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <CommandRowStyle BackColor="#D9EDB2" Font-Bold="True" />
                    <EditRowStyle BackColor="#ffffff" />
                    <RowStyle BackColor="#ffffff" ForeColor="#000000" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <FieldHeaderStyle BackColor="#F7F7DE" Font-Bold="True" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:DetailsView>
                &nbsp; &nbsp;
                &nbsp; &nbsp;
                <asp:Button ID="Button1" runat="server" OnClick="btnBack_Click" Text="回上一页" /></td>
            <td style="width: 2px">&nbsp;
                </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
         SelectCommand="SELECT id,username,username1,role,mobile,mail,gzdw,jigou,grjj,chuzhi,yiskf,xtsj1,xtsj2,leader,city FROM [account] WHERE ([id] = @id)" 
         UpdateCommand="UPDATE [account] SET [username1] = @username1, [mobile] = @mobile, [mail] = @mail, [gzdw]=@gzdw, [jigou]=@jigou,[grjj]=@grjj,[leader]=@leader,[city]=@city,[xtsj2]=getdate(),[role] = @role WHERE [id] = @id" >
        <SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="id" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="username1" />
            <asp:Parameter Name="mobile" />
            <asp:Parameter Name="grjj" />
            <asp:Parameter Name="gzdw" />
            <asp:Parameter Name="mail" />
            <asp:Parameter Name="jigou" />
            <asp:Parameter Name="leader" />
            <asp:Parameter Name="city" />
            <asp:Parameter Name="role" />
         </UpdateParameters>
    </asp:SqlDataSource>
</form>
</body>
</html>
